<?php
    require_once ('Excel.php');
    $excel = new Excel();
    header("Content-type:text/html;charset=UTF-8");
 $_conn=mysql_connect('localhost','root','root') or die(mysql_errno());
   mysql_select_db('mydemo',$_conn) or die(mysql_errno());
   mysql_query("SET NAMES UTF8") or die(mysql_errno());
    $sql = "SELECT * FROM demo_copy ";
    $row = mysql_query($sql);
    $title ="8.3查号码";
     $data = array(
        array('编号','公司名称',
            '名字','电话','邮箱','查询人'
        )
    );
    while($value = mysql_fetch_array($row))
	  {
	  	 $array=array();
        array_push($array,
            $value['id'],
            $value['company_name'],
            $value['name'],
            $value['phone'],
            $value['email'],
            '邱敏'
        );

        array_push($data,$array);
	  }
	   $excel->download($data,$title,'');
     exit;
?>